package cn.sciento.boot.data.change.handler;

import io.choerodon.mybatis.domain.EntityTable;
import java.util.List;
import cn.sciento.boot.data.change.dto.ChangeData;

public abstract class DataChangeBaseHandler {
  public abstract Boolean canProcess(EntityTable paramEntityTable);
  
  protected abstract void doProcess(EntityTable paramEntityTable, List<ChangeData> paramList);
  
  public final void handle(EntityTable table, List<ChangeData> changeDataList) {
    if (canProcess(table)) {
      doProcess(table, changeDataList);
    }
  }
  
  public abstract void doCommit();
}
